package com.csp.mingyue.common.core.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.ArrayList;
import java.util.List;

/**
 * Tree基类
 *
 * @author njy
 */

@Data
@EqualsAndHashCode
public class TreeEntity<T> {

	private static final long serialVersionUID = 1L;

	/**
	 * 父名称
	 */
	@TableField(exist = false)
	private String parentName;

	/**
	 * 父ID
	 */
	private Long parentId;

	/**
	 * 子节点
	 */
	@TableField(exist = false)
	private List<T> children = new ArrayList<>();

}
